$(document).ready(function() {

	var list = $('.main-nav');
	var listElement = $('.main-nav li');
	var listLink = $('.main-nav li a');
	var link = $('a');
	var col = $('.col');
	var content = $('.content');
	var galleryContainer = $('.gallery-container');
	var texts = $('.texts');
	var sponsors = $('.sponsors')
	var sponsorsItems = $('.sponsors li');
	

	//Main menu horizontal align

	var menuSize = 40;

	listElement.each(function(index, element){
		size = $(this).width();
		menuSize += size;
	});

	list.css('width', menuSize);
	
	//Sponsors horizontal align

	var menuSize = 0;

	sponsorsItems.each(function(index, element){
		size = $(this).width();
		menuSize += size;
	});

	sponsors.css('width', menuSize);
	
	//colons equal height
	
	var colHeight = col.height();
	var gallerytHeight = galleryContainer.height();
	var textstHeight = texts.height();
	var contentHeight = content.height();
// 		var contentHeight = gallerytHeight + textstHeight;
	
// 	alert(contentHeight);
// 	alert(colHeight);
	
	
	if(contentHeight > colHeight ){
// 			col.css('height', contentHeight - 2);
		col.css('height', contentHeight - 22);
	}
	else{
// 			content.css('height', colHeight);
		texts.css('height', colHeight - gallerytHeight - 32);
	}
	
// 		alert((contentHeight - colHezight));
	
	//Menu over effect.
	
	var regularColor = '#666666';
	var hoverColor = '#DE152C';
	
	link.each( function(){
	
		if(!$(this).parents('li').hasClass('active') || !$(this).parents('small')){
	
			$(this).mouseover(function(){
		
				$(this).css('color', regularColor).stop().animate({color:hoverColor}, 300);
		
			}).mouseout(function(){
		
				$(this).stop().animate/*css*/({color:regularColor}, 300);
		
			});
		}
	});
	
});
Shadowbox.init({
	slideshowDelay:5
}); 